<%@LANGUAGE="JAVASCRIPT" CODEPAGE="65001"%>
<!--#include file="../connections/connect.asp" -->
<!-- #include file="../Upload.asp" -->
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
</head>

<body>
	<%
			// Get reference to ASPUploader:
  var Uploader = GetASPUploader();

  // Use either physical (C:\Files), relative (..\Files), or virtual ("/Files") paths:
  Uploader.Destination = "../images";

  // Set longer timeout for large files if needed:
 Server.ScriptTimeout = 900;

  //try {
    // Start receiving and saving file(s):
    Uploader.Upload();
  //} catch(E) {
    //Response.Write("Upload canceled or error occured:<br>" + E.description);
    //Response.End();
  //}

  // Report successful upload:
 // Response.Write(Uploader.Files.Count + " file(s) successfully uploaded<br>");
 // Response.Write("Value of Text1 field: " + Uploader.Form("Text1"));
 		var pName = Request.Form("txtName")
		var catID = Request.Form("catID")
		var price = Request.Form("price")
		var size = Request.Form("size")
		var url = Request.Form("file")
		var description = Request.Form("description")
		
			var sql = "Insert INTO Product(ProductName,CatID,Price,[Image],Size,Description) VALUES ('"+pName+"','"+catID+"','"+price+"','"+url+"','"+size+"','"+description+"')"
			var list=conn.Execute(sql)
			Response.Redirect("../product.asp")
		%>
</body>
</html>
